
from mjsqltool.connectdb import ConnectDB
from mjsqltool.pgsqltool import dftopostgresql

import pandas as pd

# 打印当前工作路径


if __name__ == '__main__':
    df = pd.read_excel(r"C:\Users\manji\Downloads\服务费结算单3月.xlsx")
    DB_URI='postgresql+psycopg2://postgres:manji1688@127.0.0.1:5432/'
    with ConnectDB(database='shop_data', db_uri=DB_URI) as db:
        result = dftopostgresql(df, db, 'douyin_shop',table_name='dy_dp_gyl_fwfjsd_copy1',on_conflict='do_update', chunksize=10)
        print(result)
